package day20.String;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        
        System.out.print("请输入学生信息（格式：学号:姓名:分数）：");
        String input = scanner.nextLine();
        
        String[] arr = input.split(":");
        
        Student student = new Student();
        
        student.setId(arr[0]);
        student.setName(arr[1]);
        student.setScore(Integer.parseInt(arr[2]));

        System.out.println(student);
        
        scanner.close();
    }
}